//引入了
import request from '@/utils/request'

//es6的写法
export default{
    //1.根据专利号（patentNum）收藏专利
    collectPatent(patentNum){
        return request({
            //后端的接口
            // url: '/allPatent/'+current+'/'+limit, //方式一：字符串拼接
            url:`/collect/patent/${patentNum}`,//方式二：使用飘号` 加占位符
            method: 'post',
          })
    },
    //2.根据专利号获取是否被该用户收藏
    getPatentCollectState(patenetNum){
        return request({
            url:`/collect/state/patent/`+patenetNum,
            method:'get',
        })
    },
    //3.根据专利号取消收藏
    deleteCollectPatent(patentNum){
        return request({
            url:`/collect/delete/patent/${patentNum}`,
            method:'delete',
        })
    },
    //4.获取个人收藏的专利列表渲染数据
    getPatentCollectList(current,limit){
        return request({
            url:`collect/patent/${current}/${limit}`,
            method:'get',
        })
    }

}
